#ifndef _CMDLINE_EXCEPTIONS_
#define _CMDLINE_EXCEPTIONS_

#include <string>
#include <iostream>

#include "../util/exception.h"
#include "../util/wstr.h"

namespace cmdline {

struct CmdlineException : public util::Exception {
	CmdlineException(std::wstring errmsg) : util::Exception(errmsg) {}
};

struct UnexpectedParamException : public CmdlineException {
	UnexpectedParamException(std::wstring param) :
		CmdlineException(W(L"Unexpected parameter \"") + param + L"\".") {}
};

struct UnknownParamException : public CmdlineException {
	UnknownParamException(wchar_t param) :
		CmdlineException(W(L"Unknown parameter \"") + param + L"\".") {}
	UnknownParamException(std::wstring param) :
		CmdlineException(W(L"Unknown parameter \"") + param + L"\".") {}
};

struct ValueNotAssignedException : public CmdlineException {
	ValueNotAssignedException(std::wstring param) :
		CmdlineException(L"Setting \"" + param + L"\" was not assigned a value.") {}
};

}

#endif
